package hn.cch.framework.database;

import org.junit.Test;

import java.sql.Connection;
import java.sql.DriverManager;

public class SQLServerDemo {

    @Test
    public void test() throws Exception {
        String className = "com.microsoft.sqlserver.jdbc.SQLServerDriver";
        Class.forName(className);
        String url = "jdbc:sqlserver://localhost:1433;DatabaseName=test";
        String user = "sa";
        String password = "cch";
        Connection connection = DriverManager.getConnection(url, user, password);
        System.out.println(connection);
    }

}
